package com.haoshuang.zhouzhoubang.ui.adapter

import com.haoshuang.zhouzhoubang.databinding.ItemOrderTeamMemberBinding
import com.haoshuang.zhouzhoubang.model.bean.OrderBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter
import com.mufeng.libs.utils.view.load
import com.mufeng.libs.utils.view.visibleOrGone

/**
 * 
 */
class OrderTeamMemberAdapter(data: MutableList<OrderBean.OrderTeamMember>) : BaseBindingQuickAdapter<OrderBean.OrderTeamMember, ItemOrderTeamMemberBinding>(data) {


    override fun onBindViewHolder(
        holder: BaseBindingHolder,
        position: Int,
        item: OrderBean.OrderTeamMember?
    ) {
        if (item == null) return
        holder.getViewBinding<ItemOrderTeamMemberBinding>().apply {
            rivHead.load(item.avatar)
            tvLeader.visibleOrGone(item.team_team_leader == 1)
        }
    }
}
